import http from '@/plugins/axios/index.js';

// 获取outh
export const getAuth = params => {
  return http(`/yjz-oauth/oauth/token?grant_type=client_credentials&scope=all&client_id=web&client_secret=yjz2016`, params, {
    method: 'GET',
    //isAuth: false
  }).then(res => res);
};

// 课程目录查询
export const getCourseCatalogue = params => {
  return http(`/lt-order/select_PcSubLesson_byLessonId.do`, params, {
    method: 'GET'
  }).then(res => res);
};

// 多条件课程查询
export const getLogonless = params => {
  return http(`/lt-order/logonless/select_lesson_byname_page.do`, params, {
    method: 'POST'
  }).then(res => res);
};

// 更新推荐课程
export const getUpdateLogonless = params => {
  return http(`/lt-order/logonless/update_reco_lessons.do`, params, {
    method: 'POST'
  }).then(res => res);
};

// 讲师查询
export const getTeacher = params => {
  return http(`/yjz-user/logonless/select_EssenceLecturer_byPage.do`, params, {
    method: 'POST'
  }).then(res => res);
};

// 最新活动查询
export const getActivities = params => {
  return http(`/lt-order/logonless/queryActivitiesByPage.do`, params, {
    method: 'POST'
  }).then(res => res);
};

// 专家推荐课程查询
export const getSpecialist = params => {
  return http(`/lt-order/logonless/selectProfessorRecoLessons.do`, params, {
    method: 'GET'
  }).then(res => res);
};

// 意见反馈
export const getSubmit0pinion = params => {
  return http(`/lt-order/add_feed_back.do`, params, {
    method: 'POST'
  }).then(res => res);
};